import {Node} from 'cc';
import {GameManager} from "db://assets/scripts/game/GameManager";
import {BossController} from "db://assets/scripts/game/role/boss/BossController";

/**
 * 游戏Boss代理
 */
export class GameBossProxy {
    /**
     * boss节点
     */
    private bossNode: Node;
    /**
     * boss脚本
     */
    private bossController: BossController;
    /**
     * 代理对象
     */
    private proxy: GameManager;

    constructor(proxy: GameManager) {
        this.proxy = proxy;
    }

    /**
     * 设置Boss节点
     *
     * @param bossNode boss节点
     */
    public setBossNode(bossNode: Node) {
        this.bossNode = bossNode;
        this.bossController = bossNode.getComponent(BossController);
    }

    /**
     * Boss节点
     */
    public getBossNode(): Node {
        return this.bossNode;
    }

    /**
     * Boss脚本
     */
    public getBossController(): BossController {
        return this.bossController;
    }
}